package com.lagou.dao;

import com.lagou.pojo.User;

import java.util.List;

public interface IUserDao {

    /**
     * 查询所有用户
     * @return
     * @throws Exception
     */
    public List<User> findAll() throws Exception;


    /**
     * 根据条件进行用户查询
     * @param user
     * @return
     * @throws Exception
     */
    public User findByCondition(User user) throws Exception;

    /**
     * 删除指定ID的用户
     * @param id
     * @return
     * @throws Exception
     */
    int delete(Integer id)throws Exception;

    /**
     * 添加新用户
     * @param user
     * @return
     * @throws Exception
     */
    int insert(User user)throws Exception;

    /**
     * 更新用户信息
     * @param user
     * @return
     * @throws Exception
     */
    int update(User user)throws Exception;


}
